package mutsumimod.powers;

import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.animations.VFXAction;
import com.megacrit.cardcrawl.actions.common.LoseHPAction;
import com.megacrit.cardcrawl.actions.common.RemoveSpecificPowerAction;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.AbstractCreature;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.powers.IntangiblePlayerPower;
import com.megacrit.cardcrawl.powers.IntangiblePower;
import com.megacrit.cardcrawl.powers.StrikeUpPower;
import com.megacrit.cardcrawl.vfx.AbstractGameEffect;
import com.megacrit.cardcrawl.vfx.combat.LightningEffect;
import mutsumimod.MutsumiMod;

public class DeathPower extends BasePower {
    public static final String POWER_ID = MutsumiMod.makeID(DeathPower.class.getSimpleName());

    public DeathPower(AbstractCreature owner) {
        super(POWER_ID, PowerType.DEBUFF, false, owner, 0);
    }

    public void atEndOfTurn(boolean isPlayer) {
        if(isPlayer&&!owner.hasPower(IntangiblePlayerPower.POWER_ID)) {
            addToBot(new VFXAction(new LightningEffect(this.owner.hb.cX, this.owner.hb.cY)));
            addToBot(new LoseHPAction(this.owner, this.owner, 99999));
            addToBot(new RemoveSpecificPowerAction(owner,owner,this));
        }
    }
}
